<%@ page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="html" uri="http://struts.apache.org/tags-html"%>
<%@taglib prefix="bean" uri="http://struts.apache.org/tags-bean"%>
<%@taglib prefix="logic" uri="http://struts.apache.org/tags-logic" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<h3><bean:message key="request.list.title"/> </h3>
<html:messages id="msg" message="true" property="norooms">
	<div class="alert alert-danger">
		<bean:write name="msg"/>
	</div>
</html:messages>

<c:forEach var="req" items="${requests}">
	<a href="requestAccept.do?id=${req.id}"><button type="button" class="btn btn-xs btn-success"><bean:message key="request.list.accept"/></button></a>
	<a href="requestDelete.do?id=${req.id}"><button type="button" class="btn btn-xs btn-danger"><bean:message key="request.list.delete"/></button></a>
	${req.id}:${req.name} ${req.surname}(${req.username}) - ${req.roomClass}:${req.beds}
	<br/>
</c:forEach>

<html:messages id="msg" message="true" property="accept_success">
	<div class="alert alert-success">
		<bean:write name="msg"/>
	</div>
</html:messages>